<template>
  <BasicModal v-bind="$attrs" @register="innerRegister" :title="'订单详情'"
              style="background-color: red">
    <Description @register="descriptionRegister"/>
    <Description @register="descriptionRegister2"/>

  </BasicModal>
  <!--  <BasicModal v-bind="$attrs" @register="registerModal" :title="isUpdate ? t('action.edit') : t('action.create')" @ok="handleSubmit">
      <BasicForm @register="registerForm" />
    </BasicModal>-->
</template>

<script setup lang="ts">
  import {ref} from 'vue'
  import {BasicModal, useModalInner} from '@/components/Modal'
  import {Description, useDescription} from '@/components/Description/index'
  import {infoSchema, OrderInfo, OrderInfo2} from './order.data'
  import {getOrder} from '@/api/seatransportation/order'
  import {getMenu} from "@/api/system/menu";
  defineOptions({name: 'OrderModal'})

  //基本信息
  const data = ref<OrderInfo>()
  //下单信息
  const data2 = ref<OrderInfo2>();
  //来货信息
  const data3 = ref<OrderInfo2>();
  //集装箱信息
  //货物清单
  //质检照片
  //发件人信息
  //收件人信息

  const [innerRegister] = useModalInner(async (value) => {
    alert(value.orderid)
    data.value = value;
    data2.value = res;
  })

  const [descriptionRegister] = useDescription({
    title: '基本信息',
    collapseOptions: "{ canExpand: true, helpMessage: 'help me' }",
    column: 4,
    schema: infoSchema,
    data
  })

  const [descriptionRegister2] = useDescription({
    title: '下单信息',
    collapseOptions: "{ canExpand: true, helpMessage: 'help me' }",
    column: 4,
    schema: infoSchema,
    data: data2
  })
</script>

<style scoped></style>

